package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MedicalBaseGroupSchedulerMapper;
import com.ruoyi.system.domain.MedicalBaseGroupScheduler;
import com.ruoyi.system.service.IMedicalBaseGroupSchedulerService;

/**
 * 部门排班记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-07
 */
@Service
public class MedicalBaseGroupSchedulerServiceImpl implements IMedicalBaseGroupSchedulerService 
{
    @Autowired
    private MedicalBaseGroupSchedulerMapper medicalBaseGroupSchedulerMapper;

    /**
     * 查询部门排班记录
     * 
     * @param id 部门排班记录主键
     * @return 部门排班记录
     */
    @Override
    public MedicalBaseGroupScheduler selectMedicalBaseGroupSchedulerById(String id)
    {
        return medicalBaseGroupSchedulerMapper.selectMedicalBaseGroupSchedulerById(id);
    }

    /**
     * 查询部门排班记录列表
     * 
     * @param medicalBaseGroupScheduler 部门排班记录
     * @return 部门排班记录
     */
    @Override
    public List<MedicalBaseGroupScheduler> selectMedicalBaseGroupSchedulerList(MedicalBaseGroupScheduler medicalBaseGroupScheduler)
    {
        return medicalBaseGroupSchedulerMapper.selectMedicalBaseGroupSchedulerList(medicalBaseGroupScheduler);
    }

    /**
     * 新增部门排班记录
     * 
     * @param medicalBaseGroupScheduler 部门排班记录
     * @return 结果
     */
    @Override
    public int insertMedicalBaseGroupScheduler(MedicalBaseGroupScheduler medicalBaseGroupScheduler)
    {
        medicalBaseGroupScheduler.setCreateTime(DateUtils.getNowDate());
        return medicalBaseGroupSchedulerMapper.insertMedicalBaseGroupScheduler(medicalBaseGroupScheduler);
    }

    /**
     * 修改部门排班记录
     * 
     * @param medicalBaseGroupScheduler 部门排班记录
     * @return 结果
     */
    @Override
    public int updateMedicalBaseGroupScheduler(MedicalBaseGroupScheduler medicalBaseGroupScheduler)
    {
        return medicalBaseGroupSchedulerMapper.updateMedicalBaseGroupScheduler(medicalBaseGroupScheduler);
    }

    /**
     * 批量删除部门排班记录
     * 
     * @param ids 需要删除的部门排班记录主键
     * @return 结果
     */
    @Override
    public int deleteMedicalBaseGroupSchedulerByIds(String[] ids)
    {
        return medicalBaseGroupSchedulerMapper.deleteMedicalBaseGroupSchedulerByIds(ids);
    }

    /**
     * 删除部门排班记录信息
     * 
     * @param id 部门排班记录主键
     * @return 结果
     */
    @Override
    public int deleteMedicalBaseGroupSchedulerById(String id)
    {
        return medicalBaseGroupSchedulerMapper.deleteMedicalBaseGroupSchedulerById(id);
    }

    @Override
    public List<SysUser> selectSysUser() {
        return  medicalBaseGroupSchedulerMapper.selectSysUser();
    }
}
